#include "PrimitiveBinOp.h"

PrimitiveBinOp::PrimitiveBinOp(NodeContainer* parent,
				       Ops operation) : Node(parent),
							operation(operation)
{
  addSink();
  addSink();
  addSource();
}

void PrimitiveBinOp::process(llvm::IRBuilder<> *builder) {

  switch (operation) {
  case Add:
    sources[0]->setValue(builder->CreateAdd(terminals[0]->getValue(),terminals[1]->getValue(),"addtmp"));
    break;
  }
}
